From: Richard M. Stallman Date: Thu, 21 Mar 1996 14:16:06 +0000 (+0000) Subject: (indent-c++-exp): Use calculate-c-indent-after-brace. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~84216 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b23c9e46bd9d3471ae7b8ca2e45912306510d09d;p=emacs.git (indent-c++-exp): Use calculate-c-indent-after-brace. (c++-mode): Require c-mode. --- diff --git a/lisp/progmodes/cplus-md.el b/lisp/progmodes/cplus-md.el index 5e017473e8b..555f5a44d18 100644 --- a/lisp/progmodes/cplus-md.el +++ b/lisp/progmodes/cplus-md.el @@ -320,6 +320,8 @@ Turning on C++ mode calls the value of the variable `c++-mode-hook' with no args if that value is non-nil." (interactive) (kill-all-local-variables) + ;; This code depends on the old C mode. + (require 'c-mode) (use-local-map c++-mode-map) (set-syntax-table c++-mode-syntax-table) (setq major-mode 'c++-mode @@ -801,7 +803,7 @@ Returns nil if line starts inside a string, t if in a comment." (if (= (char-after (car contain-stack)) ?{) (save-excursion (goto-char (car contain-stack)) - (setq val (+ c-indent-level (current-column)))) + (setq val (calculate-c-indent-after-brace))) (setq val (calculate-c++-indent (if (car indent-stack) (- (car indent-stack))))))